package com.smart.home.util;

import java.util.Collection;

/**
 * 集合工具类
 *
 * @author zhangpeng
 * @version 1.0
 * @date 2017-03-09
 */
public abstract class CollectionUtils {

    /**
     * 判断集合是否为空
     *
     * @param collection
     * @return
     */
    public static boolean isEmpty(Collection collection) {
        return collection == null || collection.size() == 0;
    }

    /**
     * 非空判断
     *
     * @param collection
     * @return
     */
    public static boolean isNotEmpty(Collection collection) {
        return !isEmpty(collection);
    }
}
